<?php

/**
 * @file classes/site/Version.inc.php
 *
 * Copyright (c) 2000-2012 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * @class Version
 * @ingroup site
 * @see VersionDAO
 *
 * @brief Describes system version history.
 */


class CTKTTH extends DataObject {

	/**
	 * Constructor.
	 */

	function CTKTTH() {
		parent::DataObject();
		// Initialize object
	
	}


	function getidphieu() {		
		return $this->getData('idphieu');
	}

	function setidphieu($id) {
		return $this->setData('idphieu', $id);
	}

	function getsoct() {		
		return $this->getData('soct');
	}
	function setsoct($soct) {
		return $this->setData('soct', $soct);
	}
	
	function getngct() {
		return $this->getData('ngct');
	}
	function setngct($ngct) {
		return $this->setData('ngct', $ngct);
	}


	function getdiengiai() {
		return $this->getData('diengiai');
	}
	function setdiengiai($diengiai) {
		return $this->setData('diengiai', $diengiai);
	}
	
	
	function getlydo() {
		return trim($this->getData('lydo'));
	}
	function setlydo($data) {
		return $this->setData('lydo', $data);
	}
	
	function gettkno() {
		return trim($this->getData('tkno'));
	}
	function settkno($tk) {
		return $this->setData('tkno', $tk);
	}
	
	function gettkco() {
		return trim($this->getData('tkco'));
	}
	function settkco($tk) {
		return $this->setData('tkco', $tk);
	}
	
	function getmacttkno() {
		return trim($this->getData('macttkno'));
	}
	function setmacttkno($data) {
		return $this->setData('macttkno', $data);
	}

	function getmacttkco() {
		return trim($this->getData('macttkco'));
	}
	function setmacttkco($data) {
		return $this->setData('macttkco', $data);

	}
	function getmacttk() {
		return trim($this->getData('macttk'));
	}
	function setmacttk($data) {
		return $this->setData('macttk', $data);

	}


	
	function getsotienvn() {
		return $this->getData('sotienvn');
	}

	function setsotienvn($sotienvn) {
		return $this->setData('sotienvn', $sotienvn);
	}



	function getmatk() {
		return trim($this->getData('matk'));
	}
	function setmatk($matk) {
		return $this->setData('matk', $matk);
	}

	function gettentk() {
		return trim($this->getData('tentk'));
	}
	function settentk($tentk) {
		return $this->setData('tentk', $tentk);
	}

	function getdknovn() {
		return $this->getData('dknovn');
	}

	function getdknont() {
		return $this->getData('dknovn');
	}


	function setdknovn($data) {
		return $this->setData('dknovn', $data);
	}

	function setdknont($data) {
		return $this->setData('dknont', $data);
	}

	function getsoduC($data) {
		return -$this->getData('sotienvn')+$data;
	}

	function getsoduN($data) {
		return $this->getData('sotienvn')+$data;
	}

	function getsoduCnt($data) {
		return -$this->getData('sotiennt')+$data;
	}

	function getsoduNnt($data) {
		return $this->getData('sotiennt')+$data;
	}

	function getsps($data) {
		return $this->getData('sotienvn')+$data;
	}

	function getspsnt($data) {
		return $this->getData('sotiennt')+$data;
	}

	function gettkdu() {
		return $this->getData('tkdu');	
	}
	function settkdu($tkno, $tkco, $loaitk) {
		if (strpos($tkno, $gctk) ==0)
			$this->setData('tkdu', $tkco);
		else
			$this->setData('tkdu', $tkno);
	}
	function gettk() {
		return $this->getData('tk');	
	}

	function settk($data) {
		return $this->setData('tk', $data);	
	}

	function getnoco() {
		return $this->getData('noco');
	}
	function setnoco($tkno, $tkco, $loaitk) {
		if (strpos($tkno, $loaitk) ==0)
			$this->setData('noco', "N");
		else
			$this->setData('noco', "C");
	}


	
}

?>
